Optimal. Leaf size=187 \[ \frac{\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}}\right )^{\frac{m+2}{2}} \left (1-\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right )^{\frac{m+2}{2}} (a+b \tan (e+f x))^{n+1} F_1\left (n+1;\frac{m+2}{2},\frac{m+2}{2};n+2;\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}},\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right )}{b f (n+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.202884, antiderivative size = 187, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3515, 3512, 760, 133} \[ \frac{\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}}\right )^{\frac{m+2}{2}} \left (1-\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right )^{\frac{m+2}{2}} (a+b \tan (e+f x))^{n+1} F_1\left (n+1;\frac{m+2}{2},\frac{m+2}{2};n+2;\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}},\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right )}{b f (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3515
Rule 3512
Rule 760
Rule 133
Rubi steps
\begin{align*} \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x))^n \, dx\\ &=\frac{\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \operatorname{Subst}\left (\int (a+x)^n \left (1+\frac{x^2}{b^2}\right )^{-1-\frac{m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac{\left (\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac{a+b \tan (e+f x)}{a-\frac{b^2}{\sqrt{-b^2}}}\right )^{1+\frac{m}{2}} \left (1-\frac{a+b \tan (e+f x)}{a+\frac{b^2}{\sqrt{-b^2}}}\right )^{1+\frac{m}{2}}\right ) \operatorname{Subst}\left (\int x^n \left (1-\frac{x}{a-\sqrt{-b^2}}\right )^{-1-\frac{m}{2}} \left (1-\frac{x}{a+\sqrt{-b^2}}\right )^{-1-\frac{m}{2}} \, dx,x,a+b \tan (e+f x)\right )}{b f}\\ &=\frac{F_1\left (1+n;\frac{2+m}{2},\frac{2+m}{2};2+n;\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}},\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac{a+b \tan (e+f x)}{a-\sqrt{-b^2}}\right )^{\frac{2+m}{2}} \left (1-\frac{a+b \tan (e+f x)}{a+\sqrt{-b^2}}\right )^{\frac{2+m}{2}}}{b f (1+n)}\\ \end{align*}
Mathematica [C] time = 22.4844, size = 698, normalized size = 3.73 \[ \frac{2 (d \cos (e+f x))^m (a+b \tan (e+f x))^{n+1} F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )}{f \left (2 n (b-a \tan (e+f x)) F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )+2 (n-m) \tan (e+f x) (a+b \tan (e+f x)) F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )+2 b \sec ^2(e+f x) F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )+\frac{b (m+2) (n+1) \sec ^2(e+f x) (a+b \tan (e+f x)) \left ((a-i b) F_1\left (n+2;\frac{m}{2}+1,\frac{m}{2}+2;n+3;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )+(a+i b) F_1\left (n+2;\frac{m}{2}+2,\frac{m}{2}+1;n+3;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )\right )}{(n+2) (a-i b) (a+i b)}+\frac{m \sec ^2(e+f x) (a+b \tan (e+f x)) F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )}{\tan (e+f x)-i}+\frac{m \sec ^2(e+f x) (a+b \tan (e+f x)) F_1\left (n+1;\frac{m}{2}+1,\frac{m}{2}+1;n+2;\frac{a+b \tan (e+f x)}{a-i b},\frac{a+b \tan (e+f x)}{a+i b}\right )}{\tan (e+f x)+i}\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.239, size = 0, normalized size = 0. \begin{align*} \int \left ( d\cos \left ( fx+e \right ) \right ) ^{m} \left ( a+b\tan \left ( fx+e \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (d \cos \left (f x + e\right )\right )^{m}{\left (b \tan \left (f x + e\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\left (d \cos \left (f x + e\right )\right )^{m}{\left (b \tan \left (f x + e\right ) + a\right )}^{n}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (d \cos \left (f x + e\right )\right )^{m}{\left (b \tan \left (f x + e\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]